/*************************************************************************
	> File Name: test9.cc
	> Author: H.M. Lau
	> Mail: hm.lau@outlook.com
	> Created Time: 2023/09/19 21:01
 ************************************************************************/

#include <iostream>
#include <signal.h>

static void sigcb(int sig)
{
    std::cout << "Catch signal:" << sig << std::endl;
}

int main(int argc, char *argv[])
{
    signal(SIGINT, sigcb);
    while (1) {
        sleep(1);
    }
    return 0;
}
